// @ts-ignore
/* eslint-disable */
import { PageData, PageParams } from '@/common/page';
import { request } from '@umijs/max';


export async function getApiPage(
  data: PageParams,
  options?: { [key: string]: any },
) {
  return request<{
    code: number;
    msg?: string;
    data?: PageData;
  }>('/engine-service/api/v1/api/page', {
    method: 'POST',
    data,
    ...(options || {}),
  });
}
export async function countCase(
  params: {
    [key: string]: any
  },
  options?: { [key: string]: any },
) {
  return request<{
    code: number;
    msg?: string;
    data?: number
  }>('/engine-service/api/v1/api/count', {
    params,
    ...(options || {}),
  });
}

export async function batchDelCase(
  data: {
    [key: string]: any
  },
  options?: { [key: string]: any },
) {
  return request<{
    code: number;
    msg?: string;
    data?: number
  }>('/engine-service/api/v1/api/batch_del', {
    method: 'delete',
    data,
    ...(options || {}),
  });
}


export async function execute(
  params: {
    [key: string]: any
  },
  options?: { [key: string]: any },
) {
  return request<{
    code: number;
    msg?: string;
    data?: any
  }>('/engine-service/api/v1/api/execute', {
    params,
    ...(options || {}),
  });
}


export async function getTempUrl(
  params: {
    [key: string]: any
  },
  options?: { [key: string]: any },
) {
  return request<{
    code: number;
    msg?: string;
    data?: any
  }>('/engine-service/api/v1/file/get_temp_url', {
    params,
    ...(options || {}),
  });
}